Skip to content

Commit 6b817b7

Browse files
github:11753 Fixes about excluded modules.
1 parent 48a7036 commit 6b817b7

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

Build4D/Project/Sources/Classes/_core.4dm

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ Function _resolvePath($path : Variant; $baseFolder : 4D.Folder) : Object
331331

332332
Case of
333333

334-
: (Folder($path; *).exists)
334+
: ((Test path name($path)=Is a folder) && (Folder($path; *).exists))
335335

336336
$absolutePath:=Folder(Folder($path; *).platformPath; fk platform path).path
337337

338338

339-
: (File($path; *).exists)
339+
: ((Test path name($path)=Is a document) && (File($path; *).exists))
340340

341341
$absolutePath:=File(File($path; *).platformPath; fk platform path).path
342342

@@ -381,26 +381,26 @@ Function _resolvePath($path : Variant; $baseFolder : 4D.Folder) : Object
381381
//https://github.com/4d/4d/issues/2139
382382
//return ($absolutePath="@/") ? Folder(Folder($absolutePath; *).platformPath; fk platform path) : File(File($absolutePath; *).platformPath; fk platform path)
383383

384-
$folder:=Folder($absolutePath; *)
385384

386385
If ($absolutePath="@/")
387-
386+
$folder:=Folder($absolutePath; *)
388387
Else
389-
390388
$file:=File($absolutePath; *) // generate a -1 error if path is a folder
391-
392389
End if
393390

394391
Case of
395392

396-
: ($folder.isPackage)
393+
: (($folder#Null) && ($folder.isPackage))
397394
return Folder($folder.platformPath; fk platform path)
398395

399-
: (Bool($file.isFile))
396+
: (($file#Null) && (Bool($file.isFile)))
400397
return File($file.platformPath; fk platform path)
401398

402399
Else
403-
return Folder($folder.platformPath; fk platform path)
400+
if ($folder#Null)
401+
return Folder($folder.platformPath; fk platform path)
402+
else
403+
return Null
404404

405405
End case
406406

@@ -696,6 +696,7 @@ Function _deletePaths($paths : Collection) : Boolean
696696

697697
var $path : Variant
698698
var $deletePath : Object
699+
var $pathType: Integer
699700

700701
If (($paths#Null) && ($paths.length>0))
701702

@@ -712,9 +713,10 @@ Function _deletePaths($paths : Collection) : Boolean
712713
End if
713714

714715
//If ($deletePath.exists)//https://github.com/4d/4d/issues/2139
715-
If (Test path name(String($deletePath.platformPath))>=0)
716+
$pathType:=Test path name(String($deletePath.platformPath))
717+
If ($pathType>=0)
716718
Case of
717-
: (OB Instance of($path; 4D.File))
719+
: ($pathType=Is a file)
718720
$deletePath.delete()
719721
Else // : (OB Instance of($path; 4D.Folder)) // if not 4D folder?
720722
$deletePath.delete(fk recursive)

0 commit comments

Comments
 (0)