File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3030from urllib .parse import unquote
3131
3232from .file_or_dir import FileOrDir
33- from ..utils import is_url , iso_now
33+ from ..utils import is_url , iso_now , Mode
3434
3535
3636class Dataset (FileOrDir ):
@@ -75,7 +75,7 @@ def _copy_folder(self, base_path):
7575 errno .ENOENT , os .strerror (errno .ENOENT ), path
7676 )
7777 abs_out_path .mkdir (parents = True , exist_ok = True )
78- if not self .crate .source :
78+ if self .crate .mode == Mode . CREATE :
7979 self .crate ._copy_unlisted (path , abs_out_path )
8080
8181 def write (self , base_path ):
@@ -99,7 +99,7 @@ def _stream_folder_from_path(self, chunk_size=8192):
9999 raise FileNotFoundError (
100100 errno .ENOENT , os .strerror (errno .ENOENT ), str (path )
101101 )
102- if not self .crate .source :
102+ if self .crate .mode == Mode . CREATE :
103103 for root , _ , files in os .walk (path ):
104104 root = Path (root )
105105 for name in files :
You can’t perform that action at this time.
0 commit comments