Commit 5b11f19
committed
[FIX] fs_storage: Resolve rooted_dir sub path is inside path virtually
Before this fix, a FileNotFoundError would ocassionally arise when
'os.getcwd()' is called due to the rooted_dir _join method to check
whether the sub path is part of the parent path.
This is probably caused by the number and/or combination of workers
and threads and the transactions to the FS storage, having race
issues.
After this commit, the sub path is checked if it is contained
inside the parent path virtually via posixpath and pathlib modules
avoiding 'os.getcwd()' calls and running into this possible race
condition.1 parent b50f468 commit 5b11f19
1 file changed
+25
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | | - | |
| 44 | + | |
33 | 45 | | |
34 | | - | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
0 commit comments