diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-15 16:30:49 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-15 16:30:49 -0400 |
commit | 2d3f18876550ee2e37a60aea1c0faaa369606ae0 (patch) | |
tree | 5da6331d2e4d03748cf0c00c0cb87d82c78c16c1 /Command | |
parent | c26b2eb2a4f261fd903b02d397737cf6a3a0196b (diff) |
avoid unncessary db queries when exported directory can't be empty
In rename foo/bar to foo/baz, foo can't be empty.
In delete zxyyz, there's no exported directory (top doesn't count).
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Export.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Export.hs b/Command/Export.hs index 56676809f..cc463b7dc 100644 --- a/Command/Export.hs +++ b/Command/Export.hs @@ -321,4 +321,6 @@ cleanupRename ea db ek src dest = do removeExportLocation db (asKey ek) src addExportLocation db (asKey ek) dest flushDbQueue db - removeEmptyDirectories ea db src [asKey ek] + if exportedDirectories src /= exportedDirectories dest + then removeEmptyDirectories ea db src [asKey ek] + else return True |