Skip to content

Commit 25fb2e4

Browse files
[FIX] edi_storage_oca: FS find_files returns relative paths instead of full paths
1 parent 9285a9f commit 25fb2e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

edi_storage_oca/models/edi_backend.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,10 @@ def _storage_get_input_filenames(self, exchange_type):
161161
if exchange_type.exchange_file_ext:
162162
bits.append(r"\." + exchange_type.exchange_file_ext)
163163
pattern = "".join(bits)
164-
full_paths = utils.find_files(self.storage_id, pattern, full_input_dir_pending)
165-
pending_path_len = len(full_input_dir_pending)
166-
return [p[pending_path_len:].strip("/") for p in full_paths]
164+
relative_paths = utils.find_files(
165+
self.storage_id, pattern, full_input_dir_pending
166+
)
167+
return [p.strip("/") for p in relative_paths]
167168

168169
def _storage_new_exchange_record_vals(self, file_name):
169170
return {"exchange_filename": file_name, "edi_exchange_state": "input_pending"}

0 commit comments

Comments
 (0)