Fix a bug in parsing orphaned file names
This commit is contained in:
+1
-1
@@ -1397,7 +1397,7 @@ class NWProject():
|
||||
|
||||
if oName:
|
||||
oName = self.tr("[{0}] {1}").format(
|
||||
oPrefix, oName.strip("[%s]" % oPrefix).strip()
|
||||
oPrefix, oName.replace("[%s]" % oPrefix, "").strip()
|
||||
)
|
||||
else:
|
||||
nOrph += 1
|
||||
|
||||
@@ -928,7 +928,7 @@ def testCoreProject_OrphanedFiles(dummyGUI, nwLipsum):
|
||||
# First Item with Meta Data
|
||||
orphPath = os.path.join(nwLipsum, "content", "636b6aa9b697b.nwd")
|
||||
with open(orphPath, mode="w", encoding="utf8") as outFile:
|
||||
outFile.write("%%~name:Mars\n")
|
||||
outFile.write("%%~name:[Recovered] Mars\n")
|
||||
outFile.write("%%~path:5eaea4e8cdee8/636b6aa9b697b\n")
|
||||
outFile.write("%%~kind:WORLD/NOTE\n")
|
||||
outFile.write("%%~invalid\n")
|
||||
|
||||
Reference in New Issue
Block a user