This repository was archived by the owner on Nov 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
core/src/plugins/meta.mount Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,15 @@ protected function isAlreadyMounted()
102
102
{
103
103
list ($ user , $ password ) = $ this ->getCredentials ();
104
104
$ MOUNT_POINT = $ this ->getOption ("MOUNT_POINT " , $ user , $ password );
105
- return is_file ($ MOUNT_POINT ."/.ajxp_mount " );
105
+ if ( is_dir ($ MOUNT_POINT ) ){
106
+ if ( stat (dirname ($ MOUNT_POINT ))[0 ] == stat ($ MOUNT_POINT )[0 ] ){
107
+ return false ;
108
+ }else {
109
+ return true ;
110
+ }
111
+ }else {
112
+ return false ;
113
+ }
106
114
}
107
115
108
116
public function mountFS ()
@@ -178,7 +186,7 @@ public function umountFS()
178
186
$ MOUNT_SUDO = $ this ->options ["MOUNT_SUDO " ];
179
187
180
188
system (($ MOUNT_SUDO ?"sudo " :"" )." umount " .escapeshellarg ($ MOUNT_POINT ), $ res );
181
- if ($ this ->getOption ("REMOVE_MOUNTPOINT_ON_UNMOUNT " ) == true && $ res == 0 && !is_file ( $ MOUNT_POINT . " /.ajxp_mount " ) ){
189
+ if ($ this ->getOption ("REMOVE_MOUNTPOINT_ON_UNMOUNT " ) == true && $ res == 0 && !$ this -> isAlreadyMounted () ){
182
190
// Remove mount point
183
191
$ testRm = @rmdir ($ MOUNT_POINT );
184
192
if ($ testRm === false ){
You can’t perform that action at this time.
0 commit comments