Skip to content
Browse files

Add ERR_FILE_EXISTS

  • Loading branch information...
1 parent 7c992f8 commit c9f03c9938eab66854988fcc6d2c524aca85d76a @gruehle gruehle committed Sep 10, 2012
View
5 appshell/appshell_extensions.js
@@ -95,6 +95,11 @@ if (!appshell.app) {
appshell.fs.ERR_NOT_DIRECTORY = 9;
/**
+ * @constant Specified file already exists.
+ */
+ appshell.fs.ERR_FILE_EXISTS = 10;
+
+ /**
* Display the OS File Open dialog, allowing the user to select
* files or directories.
*
View
3 appshell/appshell_extensions_mac.mm
@@ -517,6 +517,9 @@ int32 ConvertNSErrorCode(NSError* error, bool isReading)
case NSFileWriteOutOfSpaceError:
return ERR_OUT_OF_SPACE;
break;
+ case NSFileWriteFileExistsError:
+ return ERR_FILE_EXISTS;
+ break;
}
// Unknown error
View
1 appshell/appshell_extensions_platform.h
@@ -42,6 +42,7 @@ static const int ERR_CANT_WRITE = 6;
static const int ERR_OUT_OF_SPACE = 7;
static const int ERR_NOT_FILE = 8;
static const int ERR_NOT_DIRECTORY = 9;
+static const int ERR_FILE_EXISTS = 10;
#if defined(OS_WIN)
typedef std::wstring ExtensionString;

0 comments on commit c9f03c9

Please sign in to comment.
Something went wrong with that request. Please try again.