刘歧 (12020-07-25): > I think the best would be to use strtok(p, "/") to split the path into the > components and for each ".." component remove the previous one (if there > are some still). > I think you can submit patch if you have full idea for it.
strtok() is a terrible API, and better not used, but you are right, the logic of the parsing is flawed. I would suggest to keep walk from / to / (using strchr() probably), and keep a pointer on the last two in the source and the last one in the target IIRC. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".