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.
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.