cole-trapnell-lab / cufflinks

Boost Software License 1.0
310 stars 116 forks source link

change mkpath using boost::filesystem to avoid permission error in the parent folder #80

Closed guowei-he closed 7 years ago

guowei-he commented 7 years ago

Firstly, we greatly thank the author for this wonderful code.

When using '-o' command line argument to specify output directory, it seems that the original version always tries to create all parent folders recursively with 777 permission. For example, '-o /home/user/output' will at some point try to create '/home' with 777 permission. This will raise 2 system errors: 1. Directory exists. 2. Permission denied. The first error is handled (for example, in cufflinks.cpp) but the second is not. Even if a user has permission to create '/home/user/output', if the system return 'permission denied' error code when trying to create '/home', the code will stop.

This patch changed the 'mkpath' function in common.cpp using boost::filesystem libraries. Permission and folder creations are properly handled.

jerowe commented 7 years ago

+1 this PR!

bgruening commented 7 years ago

@ctrapnell any progress on this? Is this software stack maintained or can/should downstream deprecated it?