This commit is contained in:
Vladimir Krivosheev
2015-08-25 17:11:37 +02:00
parent 54e82b7a2b
commit f22e895ada
2 changed files with 4 additions and 7 deletions
@@ -612,7 +612,10 @@ public class SchemeManagerImpl<T : Scheme, E : ExternalizableScheme>(private val
deleteUsingIo = false
for (name in filesToDelete) {
errors.catch {
StorageUtil.delete(provider, "$fileSpec/$name", roamingType)
val spec = "$fileSpec/$name"
if (provider.isApplicable(spec, roamingType)) {
provider.delete(spec, roamingType)
}
}
}
}
@@ -403,12 +403,6 @@ public class StorageUtil {
return defaultSeparator == null ? LineSeparator.getSystemLineSeparator() : defaultSeparator;
}
public static void delete(@NotNull StreamProvider provider, @NotNull String fileSpec, @NotNull RoamingType type) {
if (provider.isApplicable(fileSpec, type)) {
provider.delete(fileSpec, type);
}
}
public static boolean isProjectOrModuleFile(@NotNull String fileSpec) {
return StoragePathMacros.PROJECT_FILE.equals(fileSpec) || fileSpec.startsWith(StoragePathMacros.PROJECT_CONFIG_DIR) || fileSpec.equals(StoragePathMacros.MODULE_FILE);
}