pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 355 forks source link

Cannot delete overly long named file on windows #9840

Open sbragagnolo opened 3 years ago

sbragagnolo commented 3 years ago

Pharo 10 downloaded with pharolauncher 2.4. Windows 10 During Iceberg Clone moose.

Exception: (CannotDeleteFileException new messageText: 'Could not delete file ' , name, '. Check the file is not open.') signal.

File: "C:\Users\Santiago.BRAGAGNOLO\Documents\Pharo\images\Pharo 10.0 - 64bit (development version, latest)\pharo-local\iceberg\moosetechnology\Famix.git\objects\pack\pack_git2_a07036" self

File class>>deleteFile: WindowsStore(DiskStore)>>delete: FileSystem>>delete: FileReference>>delete DeleteVisitor>>visitReference: DeleteVisitor(FileSystemVisitor)>>visitFile: PostorderGuide>>visit: Message>>sendTo: [ self pop sendTo: self ] in PostorderGuide>>show: in Block: [ self pop sendTo: self ] PostorderGuide(FileSystemGuide)>>whileNotDoneDo: PostorderGuide>>show: PostorderGuide class(FileSystemGuide class)>>show:to:selecting: DeleteVisitor>>visit: DeleteVisitor class>>delete: FileLocator(AbstractFileReference)>>deleteAll FileLocator(AbstractFileReference)>>ensureDeleteAll [ :error | location exists ifTrue: [ location ensureDeleteAll ]. error acceptError: (IceLibgitErrorVisitor onContext: self) ] in IceGitClone>>execute in Block: [ :error |... FullBlockClosure(BlockClosure)>>cull: Context>>evaluateSignal: Context>>handleSignal: LGit_GIT_ERROR(Exception)>>signal LGit_GIT_ERROR class(LGitCallReturnHandler class)>>signalWith: LGitReturnCodeEnum>>handleLGitReturnCode LGitRepository(LGitExternalObject)>>withReturnHandlerDo: LGitRepository>>clone:options:to: LGitRepository>>clone:options: [location ensureCreateDirectory.

repo := LGitRepository on: location.
cloneOptions := repo cloneOptionsStructureClass withCredentialsProvider: (IceCredentialsProvider defaultForRemoteUrl: url).

"Keeping references, because if not the GC take them."
checkoutOptions := cloneOptions checkoutOptions.
callbacks := cloneOptions fetchOptions callbacks.
callbacks transferProgress: IceGitTransferProgress new.

checkoutOptions checkoutStrategy: LGitCheckoutStrategyEnum git_checkout_force.
checkoutOptions progressCallback: IceGitCheckoutProgress new.

repo clone: url options: cloneOptions.

(LGitRemote of: repo named: 'origin')
    lookup;
    setUrl: url.

] in IceGitClone>>execute in Block: [location ensureCreateDirectory....

FullBlockClosure(BlockClosure)>>on:do: IceGitClone>>execute IceRepositoryCreator>>cloneRepository

sbragagnolo commented 3 years ago

This issue is related with the length of the path. When the image is renamed to p10, non error is reported.