Package: scratch
Version: 1.4.0.6~dfsg1-5
Severity: important
In non-English environments, ~/Documents is localized according to XDG
specs, for example in Greece it's ~/Έγγραφα.
When a student tries to save a Scratch project, scratch tries to save it
to ~/Documents though, which doesn't exist, and fails with this message:
"Save failed:
Folder may be locked or read-only".
The problem is in unixScratchOps.c, lines 63+:
if (folderID == 2) strncat(path, "/Desktop", maxPath);
if (folderID == 4) strncat(path, "/Pictures", maxPath);
if (folderID == 5) strncat(path, "/Music", maxPath);
...
strncat(path, "/Documents", maxPath);
If those strings were not constant, but translatable (with the existing
Scratch .po files), the problem would be very mitigated.
Otherwise for a proper solution, a library function should be called,
something like:
https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-user-special-dir
At the very least, please allow the sysadmin to localize those locations
with the user's environment (XDG_DESKTOP_DIR, XDG_DOCUMENTS_DIR,
XDG_MUSIC_DIR, XDG_PICTURES_DIR). He would at least be able to create a
/usr/local/bin/scratch wrapper that sets those variables before chaining
to the real scratch launcher.
Thanks!
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]