Return value of make-dir
Posted: Thu Mar 05, 2009 11:32 am
Greetings,
Recently I found out that a script of mine stopped working under cygwin when it had been working OK for weeks.
Debugging it, I found out that, for some reason, the permissions on the base directory were incorrect and the user the script was running under couldn't create a new directory. Now, the script makes a new directory every day (based on the current date) and that's obviously bad.
Unless I'm wrong (which is, after all, very probable) make-dir just returns true or false accordingly to it being able to create or not the new directory.
Is there a system variable where I can check the reason why it hasn't been able to create the new directory? If not, would it be possible to provide it in further releases? Because it was as simple as issuing a chmod command (with the same user, it was the owner, but mod had been changed to 0444 for some reason) and that can be coded into the script.
thanks!
Recently I found out that a script of mine stopped working under cygwin when it had been working OK for weeks.
Debugging it, I found out that, for some reason, the permissions on the base directory were incorrect and the user the script was running under couldn't create a new directory. Now, the script makes a new directory every day (based on the current date) and that's obviously bad.
Unless I'm wrong (which is, after all, very probable) make-dir just returns true or false accordingly to it being able to create or not the new directory.
Is there a system variable where I can check the reason why it hasn't been able to create the new directory? If not, would it be possible to provide it in further releases? Because it was as simple as issuing a chmod command (with the same user, it was the owner, but mod had been changed to 0444 for some reason) and that can be coded into the script.
thanks!