]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: ShellExt display error if symlink not AFS
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Jun 2012 20:51:00 +0000 (16:51 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 3 Jul 2012 16:29:00 +0000 (09:29 -0700)
If the path in which a Symlink is to be created is not located
within AFS, display an error dialog.

Change-Id: I8e4cc6840d56184da7d842cc552d11624cdef89d
Reviewed-on: http://gerrit.openafs.org/7643
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/client_exp/gui2fs.cpp
src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc

index 6ba5c531f71fada4a382978f049d15bdfccc84f5..769594aaa7a3c764459d41c0c04870796ab35b29 100644 (file)
@@ -1824,6 +1824,11 @@ MakeSymbolicLink(const CString& strName, const CString& strTarget)
     CString strParent = Parent(strName);
     FixNetbiosPath(strParent);
 
+    if (!IsPathInAfs(strParent)) {
+           ShowMessageBox(IDS_MAKE_LNK_NOT_AFS_ERROR, MB_ICONERROR, IDS_MAKE_MP_NOT_AFS_ERROR);
+           return FALSE;
+    }
+
     if ( IsFreelanceRoot(strParent) && !IsAdmin() ) {
        ShowMessageBox(IDS_NOT_AFS_CLIENT_ADMIN_ERROR, MB_ICONERROR, IDS_NOT_AFS_CLIENT_ADMIN_ERROR);
        return FALSE;
index a19fd33b7598c64ea54850e30d5a799e4176c912..a7aee11178aad4edcfe59d8a2e2c3b75e711b9c2 100644 (file)
@@ -770,7 +770,7 @@ BEGIN
     IDS_UNABLE_TO_SET_CURRENT_DIRECTORY   "Unable to set current directory."
     IDS_CURRENT_DIRECTORY_PATH_TOO_LONG   "Current directory pathname is too long."
     IDS_CLEANACL_ERROR                    "Error Cleaning ACL(s)."
-    IDS_MAKE_LNK_NOT_AFS_ERROR            "Symlinks must be created within the AFS file system."
+    IDS_MAKE_LNK_NOT_AFS_ERROR            "Symbolic Links must be created within the AFS file system."
     IDS_NOT_AFS_CLIENT_ADMIN_ERROR        "Must be AFS Client Administrators to modify the root.afs volume."
     IDS_WARNING                                  "Warning"
     IDS_VOLUME_NOT_IN_CELL_WARNING       "Volume %s does not exist in cell %s.\n"