[X2go-Commits] x2goserver.git - master (branch) updated: 3.1.1.0-2-g5fc633c

X2Go dev team git-admin at x2go.org
Thu Apr 12 16:59:29 CEST 2012


The branch, master has been updated
       via  5fc633c06d3c39bf77c95afde55ed3c6236cde0c (commit)
      from  eddd060e73c5011585af52f8fdb74c63f3993e12 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5fc633c06d3c39bf77c95afde55ed3c6236cde0c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Apr 12 16:59:26 2012 +0200

    Add/fix Python X2Go folder sharing/unsharing support from Windows.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |    4 +++-
 x2goserver/bin/x2gomountdirs      |    6 ++++--
 x2goserver/bin/x2goumount-session |   27 +++++++++++++++++++++++----
 3 files changed, 30 insertions(+), 7 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 771df31..ea139c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 x2goserver (3.1.1.1-0~x2go1) UNRELEASED; urgency=low
 
-  * Continue development...
+  [ Mike Gabriel ]
+  * New upstream version (3.1.1.1):
+    - Add/fix Python X2Go folder sharing/unsharing support from Windows.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 04 Apr 2012 11:44:14 +0200
 
diff --git a/x2goserver/bin/x2gomountdirs b/x2goserver/bin/x2gomountdirs
index 58f3590..77ac985 100755
--- a/x2goserver/bin/x2gomountdirs
+++ b/x2goserver/bin/x2gomountdirs
@@ -232,7 +232,8 @@ for (my $i=0;$i<@dirs;$i++)
 		}
 		$p=~s/\//_/g;
 		$p=~s/ /_/g;
-		$p=~s/_cygdrive_//g;
+		$p=~s/~_cygdrive_//;
+		$p=~s/~_windrive_//;
 		$p=~s/~//g;
 		mkdir("$mdir/$p");
 		$mntpath="$mdir/$p";
@@ -283,7 +284,8 @@ for (my $i=0;$i<@dirs;$i++)
 				}
 
 				my $p=@dirs[$i];
-				$p=~s/\/cygdrive\///g;
+				$p=~s/\/cygdrive\///;
+				$p=~s/\/windrive\///;
 				$p=~s/\//_/g;
 				$fname="$fname/$p";
 				if ("$current_desktop" ne "NONE")
diff --git a/x2goserver/bin/x2goumount-session b/x2goserver/bin/x2goumount-session
index 88bc7fc..db99392 100755
--- a/x2goserver/bin/x2goumount-session
+++ b/x2goserver/bin/x2goumount-session
@@ -44,12 +44,19 @@ my $serv=hostname;
 if ($only_path)
 {
 	$only_path=~s/\/ramdrive\/mnt\///;
+
+	# rewrite local unix path
 	$only_path=~ s/\//_/g;
+
+	# rewrite local Windows path
+	$only_path=~ s/^([a-zA-Z]:)/_cygdrive_\1/;
+	$only_path=~ s/://;
+	$only_path=~ s/\\/_/g;
 	
 	### FIXME: handle CDROM and Removable Media mounts here, as well!!!
 
 	$only_path="$tmp_dir/$ENV{'USER'}_media/disk/$only_path";
-	#                                   ^^^^
+	#                                       ^^^^
 	syslog('debug',"x2goumount-session unmounting $only_path only");
 }
 
@@ -84,8 +91,19 @@ for ($i=0;$i<@outp;$i++)
 	{
 		if (@line[1] ne $only_path)
 		{
-			syslog('debug', "skipping non-requested path @line[1]");
-			goto cont;
+			# this is for Python X2Go, the base of Windows mounted shares starts with _windrive, not _cygdrive
+			my $only_path_windrive=$only_path;
+			$only_path_windrive=~ s/_cygdrive_/_windrive_/;
+
+			if (@line[1] ne $only_path_windrive)
+			{
+				syslog('debug', "skipping non-requested path @line[1]");
+				goto cont;
+			}
+			else
+			{
+				$only_path = $only_path_windrive;
+			}
 		}
 	}
 	my $j;
@@ -126,7 +144,8 @@ break:
 	if (! $found)
 	{
 
-		$remote=~s/\/cygdrive\///g;
+		$remote=~s/\/cygdrive\///;
+		$remote=~s/\/windrive\///;
 		$remote=~s/\//_/g;
 		$remote=(split(":","$remote"))[1];
 		$remote="$ENV{'HOME'}/Desktop/$remote";


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list