Skip to content

Commit 36bf9c2

Browse files
committed
Improve the code some more
1 parent df635a8 commit 36bf9c2

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

syncplay/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ def _tryMovePendingWatchedFiles(self):
596596
if not os.path.exists(pendingWatchedMove):
597597
self._pendingWatchedMoves.remove(pendingWatchedMove)
598598
continue
599+
if not utils.canMarkAsWatched(pendingWatchedMove):
600+
self._pendingWatchedMoves.remove(pendingWatchedMove)
601+
continue
599602
originalDir = os.path.dirname(pendingWatchedMove)
600603
watchedDir = utils.getWatchedSubfolder(originalDir)
601604
utils.createWatchedSubdirIfNeeded(watchedDir)

syncplay/resources/no_eye.png

1.02 KB
Loading

syncplay/resources/yes_eye.png

1.04 KB
Loading

syncplay/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,10 @@ def getCorrectedPathForFile(filePath):
555555
correctedDirectory = getCorrectedDirectoryForFile(filePath)
556556
filename = os.path.basename(filePath)
557557
correctedPath = os.path.join(correctedDirectory, filename)
558-
return correctedPath
558+
if os.path.isfile(correctedPath):
559+
return correctedPath
560+
else:
561+
return filePath
559562

560563
def isWatchedSubfolder(directoryPath):
561564
if not directoryPath:

0 commit comments

Comments
 (0)