# HG changeset patch # User Christophe Lincoln # Date 1332838217 -7200 # Node ID 2d78c44e8ad590ac3258aa08ba27e40d3729b494 # Parent b870dbff832cd03eb22c5dbf4c9cbfc5a30a0427 rootfs.cgi: Add support for file on user Desktop diff -r b870dbff832c -r 2d78c44e8ad5 web/rootfs.cgi --- a/web/rootfs.cgi Tue Mar 27 10:33:41 2012 +0200 +++ b/web/rootfs.cgi Tue Mar 27 10:50:17 2012 +0200 @@ -85,16 +85,17 @@ else notify "$(gettext "Unsupported image format")" "error" fi ;; - *\ desktop-file\ *) + *\ desktop\ *) id="$(POST id)" - tmpname="$(FILE desktop-file tmpname)" - file="$(FILE desktop-file name)" - size="$(FILE desktop-file size)" + tmpname="$(FILE desktop tmpname)" + file="$(FILE desktop name)" + size="$(FILE desktop size)" path="$tmpdir/slitaz-$id/rootfs/etc/skel/Desktop" mkdir -p $path case "$file" in *README*|*.desktop|*.html|*.png|*.jpg) mv $tmpname $path/$file + chmod a+r $path/$file notify "$(gettext "Added file:") $file ($size Bytes)" ;; *) notify "$(gettext "Unsupported file type")" "error" ;; @@ -154,22 +155,20 @@ -

$(gettext "Rootfs tarball")