Skip to content

Commit 87aff2d

Browse files
author
Dirk Petersen
committed
skipping permissions and iconv fix
1 parent 17c8e98 commit 87aff2d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

froster/froster.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ def assure_permissions_and_group(self, directory):
427427
if (dir_current_mode & 0o7777) != desired_mode:
428428
os.chmod(dir_path, desired_mode)
429429

430+
if self.is_shared:
431+
continue
432+
430433
for file in files:
431434
path = os.path.join(root, file)
432435
file_current_mode = os.stat(path).st_mode
@@ -3623,7 +3626,7 @@ def _index_locally(self, folder):
36233626
iconv = 'iconv'
36243627
if os.path.exists('/usr/bin/iconv'):
36253628
iconv = '/usr/bin/iconv'
3626-
mycmd = f'{iconv} -f ISO-8859-1 -t UTF-8 {pwalk_output.name} -o {copy_file_path}'
3629+
mycmd = f'{iconv} -f ISO-8859-1 -t UTF-8 {pwalk_output.name} > {copy_file_path}'
36273630

36283631
# Run the copy command
36293632
result = subprocess.run(mycmd, shell=True)
@@ -3650,7 +3653,7 @@ def _index_locally(self, folder):
36503653
# pwalk does already output UTF-8, weird, probably duckdb error
36513654

36523655
# Build the file conversion command
3653-
mycmd = f'iconv -f ISO-8859-1 -t UTF-8 {pwalk_output_folders.name} -o {pwalk_output_folders_converted.name}'
3656+
mycmd = f'iconv -f ISO-8859-1 -t UTF-8 {pwalk_output_folders.name} > {pwalk_output_folders_converted.name}'
36543657

36553658
# Run the file conversion command
36563659
result = subprocess.run(mycmd, shell=True)

0 commit comments

Comments
 (0)