XPCOM file moveTo on OS X

RESOLVED INCOMPLETE

Status

Core Graveyard
Embedding: GRE Core
--
major
RESOLVED INCOMPLETE
5 years ago
2 years ago

People

(Reporter: info, Unassigned)

Tracking

23 Branch
x86_64
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130803192641

Steps to reproduce:

I am trying to rename a file on OS X a file with the moveTo functionality of XPCOM. 

The code I am using:

var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
file.initWithPath(filePath); 
            
var targetDir = "/somedir/anotherdir";
var targetFileName = "somefilename.txt";

var targetDirFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
targetDirFile.initWithPath(targetDir);      

file.moveTo(targetDirFile,targetFileName);

The same code works fine on windows and ubuntu linux.


Actual results:

Error: tagspaces: Renaming failed [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/XPIProvider.jsm -> file:///Users/___/Library/Application%20Support/Firefox/Profiles/hrodvt51.default/extensions/jid1-FBaMKxTifTSahQ@jetpack/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://jid1-fbamkxtiftsahq-at-jetpack/tagspaces/lib/ioutils.js :: rename :: line 331" data: no]


Expected results:

the moveTo should have renamed the file.
(Reporter)

Updated

5 years ago
Severity: normal → major

Updated

5 years ago
Component: Untriaged → Embedding: GRE Core
Product: Firefox → Core
(Reporter)

Updated

5 years ago
OS: Linux → Mac OS X

Comment 1

2 years ago
Mass change of bugs in the "Embedding: GRE Core" component in preparation for archiving it. I believe that these are no longer relevant; but if they are, they should be reopened and moved into a component relevant to the code in question.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
(Assignee)

Updated

2 years ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.