Check if image exist before download it

This commit is contained in:
Eduardo Riesco 2017-12-02 18:45:46 +00:00 committed by Offray Luna
parent b9a49adf32
commit 1fe2d9542d

View File

@ -339,9 +339,10 @@ GrafoscopioNode >> downloadImagesInto: folder [
path:= path , '/' , eachDirectory . path:= path , '/' , eachDirectory .
(folder / path) ensureCreateDirectory ]. (folder / path) ensureCreateDirectory ].
localFolder := (folder / each directory). localFolder := (folder / each directory).
ZnClient new (localFolder / each lastPathSegment) exists ifFalse: [
url: each ; ZnClient new
downloadTo: localFolder . ] url: each ;
downloadTo: localFolder . ]]
] ]
{ #category : #'custom markup' } { #category : #'custom markup' }