MantisBT - ATutor
View Issue Details
0003912ATutorPatcherpublic2009-08-11 03:162010-12-20 10:20
IndieRect 
cindy 
normalminoralways
closedfixed 
1.6.2 
2.0.1 
SVN
0003912: Patcher can't create directories
As of 1.6.2, I didn't find a way to create directories from within a patch.

That is, when a file in a non-existent directory is to be added by a patch, that directory is not created.
Worse still, a user gets confusing instructions to grant write permissions on a folder with empty path and cannot neither proceed further nor understand the real reason.

Or am I missing something?
No tags attached.
Issue History
2009-08-11 03:16IndieRectNew Issue
2009-08-11 03:16IndieRectAffects version => SVN
2009-11-05 09:58gregNote Added: 0003831
2009-11-05 09:58gregStatusnew => acknowledged
2010-09-13 11:14harrisNote Added: 0004608
2010-09-13 11:14harrisStatusacknowledged => assigned
2010-09-13 11:14harrisAssigned To => cindy
2010-09-25 22:32IndieRectNote Added: 0004651
2010-09-30 10:20cindyStatusassigned => resolved
2010-09-30 10:20cindyFixed in Version => 2.0.1
2010-09-30 10:20cindyResolutionopen => fixed
2010-09-30 10:20cindyNote Added: 0004674
2010-12-20 10:20gregStatusresolved => closed

Notes
(0003831)
greg   
2009-11-05 09:58   
Good idea. Maybe something for a future release.
(0004608)
harris   
2010-09-13 11:14   
I believe this is fixed now?
(0004651)
IndieRect   
2010-09-25 22:32   
It's not. The same error message shows up.
(0004674)
cindy   
2010-09-30 10:20   
SVN revision:

Solution:
Different actions depending on the file operation:
1. add: create the directory with 755 permission
2. delete: no action, continue
3. alter, overwrite: stop and display message "cannot proceed due to the absence of the file"

Affected script:
install/db/atutor_upgrade_2.0_to_2.0.1.sql
mods/_standard/patcher/classes/Patch.class.php