mirror of https://github.com/ClassiCube/ClassiCube
Return specific error code for non writable filesystem
This commit is contained in:
parent
2cbe56aaeb
commit
fe76435079
|
|
@ -54,6 +54,18 @@ jobs:
|
|||
with:
|
||||
SOURCE_FILE: 'SDK/epoc32/release/armv5/urel/ClassiCube_s60v3.exe'
|
||||
DEST_NAME: 'ClassiCube_s60v3.exe'
|
||||
|
||||
- uses: ./.github/actions/upload_build
|
||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||
with:
|
||||
SOURCE_FILE: 'SDK/epoc32/release/armv5/urel/ClassiCube_s60v5.exe.sym'
|
||||
DEST_NAME: 'ClassiCube_s60v5.elf'
|
||||
|
||||
- uses: ./.github/actions/upload_build
|
||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||
with:
|
||||
SOURCE_FILE: 'SDK/epoc32/release/armv5/urel/ClassiCube_s60v3.exe.sym'
|
||||
DEST_NAME: 'ClassiCube_s60v3.elf'
|
||||
|
||||
|
||||
- uses: ./.github/actions/notify_success
|
||||
|
|
|
|||
|
|
@ -138,5 +138,6 @@ enum CC_ERRORS {
|
|||
SSL_ERR_CONTEXT_DEAD = 0xCCDED070UL, /* Server shutdown the SSL context and it must be recreated */
|
||||
PNG_ERR_16BITSAMPLES = 0xCCDED071UL, /* Image uses 16 bit samples, which is unimplemented */
|
||||
ERR_NO_NETWORKING = 0xCCDED072UL, /* No working network connection */
|
||||
ERR_NON_WRITABLE_FS = 0xCCDED073UL, /* No writable filesystem detected */
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -116,9 +116,10 @@ static const char* GetCCErrorDesc(cc_result res) {
|
|||
case NBT_ERR_EXPECTED_ARR: return "Expected ByteArray NBT tag";
|
||||
case NBT_ERR_ARR_TOO_SMALL:return "ByteArray NBT tag too small";
|
||||
|
||||
case HTTP_ERR_NO_SSL: return "HTTPS URLs are not currently supported";
|
||||
case HTTP_ERR_NO_SSL: return "HTTPS URLs are not currently supported";
|
||||
case SOCK_ERR_UNKNOWN_HOST: return "Host could not be resolved to an IP address";
|
||||
case ERR_NO_NETWORKING: return "No working network access";
|
||||
case ERR_NO_NETWORKING: return "No working network access";
|
||||
case ERR_NON_WRITABLE_FS: return "Non-writable filesystem";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ void Platform_EncodePath(cc_filepath* dst, const cc_string* path) {
|
|||
void Directory_GetCachePath(cc_string* path) { }
|
||||
|
||||
cc_result Directory_Create(const cc_filepath* path) {
|
||||
if (!fat_available) return ENOSYS;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
|
||||
return mkdir(path->buffer, 0) == -1 ? errno : 0;
|
||||
}
|
||||
|
|
@ -157,12 +157,12 @@ cc_result File_Open(cc_file* file, const cc_filepath* path) {
|
|||
}
|
||||
|
||||
cc_result File_Create(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT | O_TRUNC);
|
||||
}
|
||||
|
||||
cc_result File_OpenOrCreate(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,12 +286,12 @@ cc_result File_Open(cc_file* file, const cc_filepath* path) {
|
|||
}
|
||||
|
||||
cc_result File_Create(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT | O_TRUNC, "Create");
|
||||
}
|
||||
|
||||
cc_result File_OpenOrCreate(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT, "Update");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ void Platform_EncodePath(cc_filepath* dst, const cc_string* path) {
|
|||
void Directory_GetCachePath(cc_string* path) { }
|
||||
|
||||
cc_result Directory_Create(const cc_filepath* path) {
|
||||
if (!fat_available) return ENOSYS;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
|
||||
return mkdir(path->buffer, 0) == -1 ? errno : 0;
|
||||
}
|
||||
|
|
@ -170,12 +170,12 @@ cc_result File_Open(cc_file* file, const cc_filepath* path) {
|
|||
}
|
||||
|
||||
cc_result File_Create(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT | O_TRUNC);
|
||||
}
|
||||
|
||||
cc_result File_OpenOrCreate(cc_file* file, const cc_filepath* path) {
|
||||
if (!fat_available) return ENOTSUP;
|
||||
if (!fat_available) return ERR_NON_WRITABLE_FS;
|
||||
return File_Do(file, path->buffer, O_RDWR | O_CREAT);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue